import requests

def check_website_status(url):
    try:
        get(url)
    except requests.exceptions.RequestException as e:
        print(f"网站 {url} 存在问题: {e}")

def get(url):
    response = requests.get(url, timeout=5)  # 设置请求超时时间
    response.raise_for_status()  # 如果响应状态码不是200，则抛出HTTPError异常
    print(f"网站 {url} 运行正常，状态码: {response.status_code}")
    return response.status_code


    # 测试网站
weblist = [ "https://www.zsuuu.com",
            # "https://101.133.132.75:9999/995907",
            "http://101.133.132.75:20418",
            "http://101.133.132.75:20419",
            "http://101.133.132.75:20420",
            "http://101.133.132.75:20423",
            "http://101.133.132.75:11111",
            "http://101.133.132.75:911",
            "http://101.133.132.75:9959",
            "http://101.133.132.75:9960",
           ]


if __name__ == "__main__":
    for web in weblist:
        check_website_status(web)
